#include "DownloadAutomaticRequestCmd.h"

DownloadAutomaticRequestCmd::DownloadAutomaticRequestCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::CloudProtocol;
    this->m_functionCode = FunctionCode;
}

Package DownloadAutomaticRequestCmd::toPackage()
{
    Package package;
    QByteArray body;

   // body = encrypt(body,KeyType::AES);

    package.setId(m_cmdId);
    package.setFunction(FunctionCode);
    package.setBody(body);
    return package;
}

void DownloadAutomaticRequestCmd::unPackage(Package package)
{
    m_cmdId = package.id();
}


